package com.hongwang;

import com.alibaba.boot.dubbo.annotation.EnableDubboConfiguration;
import com.hongwang.com.hongwang.client.StudentCient;
import com.hongwang.dto.StudentDTO;
import com.hongwang.request.StudentRequest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 *
 * @author 1
 * @date 2018/1/16
 */
@SpringBootApplication
@EnableDubboConfiguration
public class CilentApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(CilentApplication.class, args);
        StudentCient cient= (StudentCient) run.getBean("studentCient");
        StudentRequest studentRequest=new StudentRequest();
        studentRequest.setStudentDTO(new StudentDTO());
       // cient.save(studentRequest);
        Integer save = cient.save(studentRequest);
        System.out.println(save);
    }


}
